package com.IMI.DatabaseActivity;

import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.Resources;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.PreferenceActivity;
import android.preference.PreferenceManager;
import android.preference.Preference.OnPreferenceChangeListener;
import android.preference.Preference.OnPreferenceClickListener;
import android.util.Log;
import android.widget.Toast;

public class StockPreferences extends PreferenceActivity {
	private String SubscribePreference;
		protected void onCreate(Bundle savedInstanceState) {
	        super.onCreate(savedInstanceState);
	        addPreferencesFromResource(R.xml.preferences);
	        
	        Resources res = getResources();

	        
	        Preference customPref = (Preference) findPreference("subscribePref");        
            customPref.setOnPreferenceChangeListener(new OnPreferenceChangeListener() 
            {
            	
				@Override
				public boolean onPreferenceChange(Preference arg0, Object arg1) {
					// TODO Auto-generated method stub
					Toast.makeText(getBaseContext(),
			                "The custom preference has been clicked",
			                Toast.LENGTH_LONG).show();
					return false;
				
				}	
            });    
		}           
        /*    
		private void getPrefs() {
                // Get the xml/preferences.xml preferences
                SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getBaseContext());
                SubscribePreference =prefs.getString("subscribePref", "nr1");
                

                if(SubscribePreference.equals("1"))
                {
                	
                	Intent intent1 = new Intent(this,SeriesExpandableList.class);
            		startActivityForResult(intent1, 1);
                }
            
}*/

}	
